﻿Imports DTO
Imports DAO
Public Class BookingBUS

    Private bookingDao As New BookingDAO()
    Public Sub InsertBooking(ByVal custId As Integer, ByVal staffId As Integer, ByVal dateIn As Date, ByVal dateOut As Date)
        bookingDao.InsertBooking(custId, staffId, dateIn, dateOut)
    End Sub

    Public Function GetBookingIdMax() As Integer
        Return bookingDao.GetBookingIdMax()
    End Function

    Public Function GetListBooking(ByVal staffID As Integer, ByVal passport As String) As List(Of BookingDTO)
        Return bookingDao.GetListBooking(staffID, passport)
    End Function
    Public Sub Update(ByVal bookingId As Integer, ByVal dateIn As Date, ByVal dateOut As Date)
        bookingDao.Update(bookingId, dateIn, dateOut)
    End Sub
    Public Function GetByBookingId(ByVal bookingId As Integer) As BookingDTO
        Return bookingDao.GetByBookingId(bookingId)
    End Function
    Public Sub UpdateStatus(ByVal bookingId As Integer, ByVal status As String)
        bookingDao.UpdateStatus(bookingId, status)
    End Sub
    Public Function GetListCustomerByBooking(ByVal staffId As Integer) As List(Of BookingDTO)
        Return bookingDao.GetListCustomerByBooking(staffId)
    End Function
End Class
